//package com.zzyl.nursing.controller.member;
//import com.zzyl.nursing.dto.UserLoginRequestDto;
//import com.zzyl.nursing.vo.LoginVo;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.Parameter;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import java.util.List;
//import jakarta.servlet.http.HttpServletResponse;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.zzyl.common.annotation.Log;
//import com.zzyl.common.core.controller.BaseController;
//import com.zzyl.common.core.domain.AjaxResult;
//import com.zzyl.common.enums.BusinessType;
//import com.zzyl.nursing.domain.FamilyMember;
//import com.zzyl.nursing.service.IFamilyMemberService;
//import com.zzyl.common.utils.poi.ExcelUtil;
//import com.zzyl.common.core.page.TableDataInfo;
//
///**
// * 老人家属Controller
// *
// * @author lapalace
// * @date 2025-08-01
// */
//@Tag(name = "老人家属")
//@RestController
//@RequestMapping("/member/user")
//public class FamilyMemberController extends BaseController
//{
//    @Autowired
//    private IFamilyMemberService familyMemberService;
//
//    @PostMapping("/login")
//    @Operation(description = "老人家属相关接口")
//    public AjaxResult login(@RequestBody UserLoginRequestDto dto){
//        System.out.println("--------");
//        System.out.println(dto);
//        LoginVo vo = familyMemberService.login(dto);
//
//        return success(vo);
//    }
//
//    /**
//     * 查询老人家属列表
//     */
//    @Operation(summary = "查询老人家属列表")
//    @PreAuthorize("@ss.hasPermi('nursing:member:list')")
//    @GetMapping("/list")
//    public TableDataInfo list(FamilyMember familyMember)
//    {
//        startPage();
//        List<FamilyMember> list = familyMemberService.selectFamilyMemberList(familyMember);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出老人家属列表
//     */
//    @Operation(summary = "导出老人家属列表")
//    @PreAuthorize("@ss.hasPermi('nursing:member:export')")
//    @Log(title = "老人家属", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, FamilyMember familyMember)
//    {
//        List<FamilyMember> list = familyMemberService.selectFamilyMemberList(familyMember);
//        ExcelUtil<FamilyMember> util = new ExcelUtil<FamilyMember>(FamilyMember.class);
//        util.exportExcel(response, list, "老人家属数据");
//    }
//
//    /**
//     * 获取老人家属详细信息
//     */
//    @Operation(summary = "获取老人家属详细信息")
//    @PreAuthorize("@ss.hasPermi('nursing:member:query')")
//    @GetMapping(value = "/{id}")
//    public AjaxResult getInfo(@Parameter(description ="老人家属ID") @PathVariable("id") Long id)
//    {
//        return success(familyMemberService.selectFamilyMemberById(id));
//    }
//
//    /**
//     * 新增老人家属
//     */
//    @Operation(summary = "新增老人家属")
//    @PreAuthorize("@ss.hasPermi('nursing:member:add')")
//    @Log(title = "老人家属", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody FamilyMember familyMember)
//    {
//        return toAjax(familyMemberService.insertFamilyMember(familyMember));
//    }
//
//    /**
//     * 修改老人家属
//     */
//    @Operation(summary = "修改老人家属")
//    @PreAuthorize("@ss.hasPermi('nursing:member:edit')")
//    @Log(title = "老人家属", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody FamilyMember familyMember)
//    {
//        return toAjax(familyMemberService.updateFamilyMember(familyMember));
//    }
//
//    /**
//     * 删除老人家属
//     */
//    @Operation(summary = "删除老人家属")
//    @PreAuthorize("@ss.hasPermi('nursing:member:remove')")
//    @Log(title = "老人家属", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{ids}")
//    public AjaxResult remove(@Parameter(description = "老人家属ID集合") @PathVariable Long[] ids)
//    {
//        return toAjax(familyMemberService.deleteFamilyMemberByIds(ids));
//    }
//}
